// UserDefinedDisplaySet.cpp : implementation file
//

#include "stdafx.h"
#include "kwservercore.h"
#include "UserDefinedDisplaySet.h"

#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif

/////////////////////////////////////////////////////////////////////////////
// CUserDefinedDisplaySet

IMPLEMENT_DYNAMIC(CUserDefinedDisplaySet, CRecordset)

	CUserDefinedDisplaySet::CUserDefinedDisplaySet(CDatabase* pdb)
	: CRecordset(pdb)
{
	//{{AFX_FIELD_INIT(CUserDefinedDisplaySet)
	m_UserId = _T("");
	m_DisplayName = _T("");
	m_ShareFlag = 0;
	m_Content = _T("");
	m_nFields = 4;
	//}}AFX_FIELD_INIT
	m_nDefaultType = snapshot;
}

CString CUserDefinedDisplaySet::GetDefaultConnect()
{
	return _T("ODBC;DSN=KWSystem;UID=kwuser;PWD=1234");
}

CString CUserDefinedDisplaySet::GetDefaultSQL()
{
	return _T("[dbo].[UserDefinedDisplay]");
}

void CUserDefinedDisplaySet::DoFieldExchange(CFieldExchange* pFX)
{
	//{{AFX_FIELD_MAP(CUserDefinedDisplaySet)
	pFX->SetFieldType(CFieldExchange::outputColumn);
	RFX_Text(pFX, _T("[UserId]"), m_UserId);
	RFX_Text(pFX, _T("[DisplayName]"), m_DisplayName);
	RFX_Byte(pFX, _T("[ShareFlag]"), m_ShareFlag);
	RFX_Text(pFX, _T("[Content]"), m_Content, 65535, SQL_LONGVARCHAR);
	//}}AFX_FIELD_MAP
}

/////////////////////////////////////////////////////////////////////////////
// CUserDefinedDisplaySet diagnostics

#ifdef _DEBUG
void CUserDefinedDisplaySet::AssertValid() const
{
	CRecordset::AssertValid();
}

void CUserDefinedDisplaySet::Dump(CDumpContext& dc) const
{
	CRecordset::Dump(dc);
}
#endif //_DEBUG